#ifndef RENDER_FRAGMENT_H
#define RENDER_FRAGMENT_H

#include "Common/ZHSTD.h"
#include "Graphics/Resource.h"

namespace ZH{
    namespace Graphics{

        // Forwards
        class Camera;
        class World;
        class RenderTarget;

        class ZH_DLL RenderFragment : public Resource
        {
        public:
            RenderFragment(Camera*, World*, RenderTarget**, unsigned int);
            virtual ~RenderFragment();

            Camera* camera()const {return m_pCamera; }
            void    camera(Camera* cam){ m_pCamera = cam; };

            World* world()const{ return m_pWorld; }
            void   world(World* w){ m_pWorld = w;}

            void render();

        private:
            Camera          *m_pCamera;
            World           *m_pWorld;
            RenderTarget    **m_pRenderTargets;
            unsigned int    m_uRenderTargetCount;

            // Put at last line
            CLASS_TYPE_NAME_DECLEARATION
        };
    } // End namespace Graphics
} // End namespace ZH

#endif